package com.ht.module.sys.controller;

import com.ht.config.log.annotation.SysLog;
import com.ht.module.sys.service.SysRoleAuthService;
import com.ht.util.JsonResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 角色自定义权限表 前端控制器
 * </p>
 *
 * @author hejialun
 * @since 2022-04-20
 */
@RestController
@Tag(name = "角色自定义权限")
@RequestMapping("/sys-role-auth")
public class SysRoleAuthController {


    @Autowired
    private SysRoleAuthService sysRoleAuthService;


    @GetMapping("/findCustomByRoleId/{roleId}")
    @Operation(summary = "通过角色ID获取角色自定义权限")
    @SysLog(msg = "通过角色ID获取角色自定义权限")
    public JsonResult findCustomByRoleId(@PathVariable String roleId) {
        return JsonResult.success(sysRoleAuthService.findCustomByRoleId(roleId));
    }


}
